package cn.itsource.pethome_0310.org.service.impl;

import cn.itsource.pethome_0310.basic.domain.BaseQuery;
import cn.itsource.pethome_0310.org.domain.Employee;
import cn.itsource.pethome_0310.org.mapper.EmployeeMapper;
import cn.itsource.pethome_0310.org.service.EmployeeService;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class EmployeeServiceImpl implements EmployeeService {
    @Autowired
    EmployeeMapper employeeMapper;

    @Override
    public void insert(Employee employee) {
        employeeMapper.insertSelective(employee);
    }

    @Override
    public void update(Employee employee) {

    }

    @Override
    public List<Employee> findAll() {
        return employeeMapper.selectAll();
    }

    @Override
    public void delete(Long id) {
        employeeMapper.delete(id);
    }

    @Override
    public void batchDelete(List<Long> id) {

    }

    @Override
    public PageInfo<Employee> basePageList(BaseQuery baseQuery) {
        return employeeMapper.findPageList1(baseQuery);
    }
}
